﻿using System.Collections.Generic;
using System.Linq;

namespace Vk.Methods.Users
{
    /// <summary>
    /// Информация о полях из раздела «Жизненная позиция».
    /// </summary>
    public class UserPersonal
    {
        public UserPersonal(ApiNode node)
        {
            Political = node.Short("political");
            Languages = node.SelectNode("langs").ChildNodes.Select(x => x.String()).ToList();
            Religion = node.String("religion");
            InspiredBy = node.String("inspired_by");
            PeopleMain = node.Short("people_main");
            LifeMain = node.Short("life_main");
            Alcohol = node.Short("alcohol");
            Smoking = node.Short("smoking");
        }

        /// <summary>
        ///     Политические предпочтения.
        /// </summary>
        public short? Political { get; set; }

        /// <summary>
        ///     Языки.
        /// </summary>
        public List<string> Languages { get; set; }

        /// <summary>
        ///     Мировоззрение.
        /// </summary>
        public string Religion { get; set; }

        /// <summary>
        ///     Источники вдохновения.
        /// </summary>
        public string InspiredBy { get; set; }

        /// <summary>
        ///     Главное в людях.
        /// </summary>
        public short? PeopleMain { get; set; }

        /// <summary>
        ///     Главное в жизни.
        /// </summary>
        public short? LifeMain { get; set; }

        /// <summary>
        ///     Отношение к курению.
        /// </summary>
        public short? Smoking { get; set; }

        /// <summary>
        ///     Отношение к алкоголю.
        /// </summary>
        public short? Alcohol { get; set; }
    }
}